﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using DistDataProcessor.Data;
using DistDataProcessor;

namespace DistDataProcessorTest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void SaveIntoLocalDb()
        {
            var list = new List<MeasureDistanceData>();
            //增加group数据
            list.Add(new MeasureDistanceData()
            {
                PrjId = -999,
                Id = -1,
                Distance = 5.234
            });
            list.Add(new MeasureDistanceData()
            {
                PrjId = -999,
                Id = -2,
                Distance = 6.897
            });
            list.Add(new MeasureDistanceData()
            {
                PrjId = -999,
                Id = -3,
                Distance = 7.892
            });
            LocalDataBaseHelper.SaveDistDataGroup(list);
        }

        [TestMethod]
        public void GetFromLocalDb()
        {
            var List =  LocalDataBaseHelper.GetDistDataByPrjId(-999);
        }

        [TestMethod]
        public void SaveConfigIntoLocalDb()
        {
            LocalDataBaseHelper.SaveDistConfigDatas(-999, new List<int>() { 1, 2, 3, 4, 5 }, 
                new List<int>() { 111, 222, 333, 444, 555 });
        }

        [TestMethod]
        public void GetConfigFromLocalDb()
        {
            var list = LocalDataBaseHelper.GetDistConfigDevicesIds(-999);
        }
    }
}
